<!--
 * @Description: 
 * @Author: 郑灶欣
 * @Date: 2021-12-17 15:40:39
 * @LastEditors: 郑灶欣
 * @LastEditTime: 2021-12-17 15:40:40
 * @FilePath: \vue3-admin\src\views\tree\index.vue
-->
<template>
    <a-tree
      :data="treeData"
      :default-expanded-keys="['0-0-0']"
      :default-selected-keys="['0-0-0', '0-0-1']"
    />
  </template>
  <script>
    export default {
      data() {
        return {
          treeData,
        };
      },
    };
  
    const treeData = [
      {
        title: 'Trunk 0-0',
        key: '0-0',
        children: [
          {
            title: 'Branch 0-0-0',
            key: '0-0-0',
            disabled: true,
            children: [
              {
                title: 'Leaf',
                key: '0-0-0-0',
              },
              {
                title: 'Leaf',
                key: '0-0-0-1',
              }
            ]
          },
          {
            title: 'Branch 0-0-1',
            key: '0-0-1',
            children: [
              {
                title: 'Leaf',
                key: '0-0-1-0',
              },
            ]
          },
        ],
      },
    ];
  </script>